package com.dimples.dd.system.model.query;


import cn.hutool.core.date.DatePattern;
import com.dimples.dd.common.annotation.InEnum;
import com.dimples.dd.common.enums.CommonStatusEnum;
import com.dimples.dd.common.pojo.PageParam;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Size;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;

@Schema(description ="字典类型分页查询对象")
@Data
public class DictTypePageQuery extends PageParam {

    @Schema(description = "字典类型名称，模糊匹配", example = "性别")
    private String name;

    @Schema(description = "字典类型，模糊匹配", example = "sys_common_sex")
    @Size(max = 100, message = "字典类型类型长度不能超过100个字符")
    private String type;

    @Schema(description = "展示状态，参见 CommonStatusEnum 枚举类", example = "1")
    @InEnum(value = CommonStatusEnum.class, message = "修改状态必须是 {value}")
    private Integer status;

    @DateTimeFormat(pattern = DatePattern.NORM_DATETIME_PATTERN)
    @Schema(description = "创建时间")
    private LocalDateTime[] createTime;

}
